package com.dower.clothing.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dower.clothing.mapper.NntPlatformCouponMapper;
import com.dower.clothing.domain.NntPlatformCoupon;
import com.dower.clothing.service.INntPlatformCouponService;
import com.dower.common.core.text.Convert;

/**
 * 平台优惠券Service业务层处理
 * 
 * @author dower
 * @date 2020-08-31
 */
@Service
public class NntPlatformCouponServiceImpl implements INntPlatformCouponService 
{
    @Autowired
    private NntPlatformCouponMapper nntPlatformCouponMapper;

    /**
     * 查询平台优惠券
     * 
     * @param numId 平台优惠券ID
     * @return 平台优惠券
     */
    @Override
    public NntPlatformCoupon selectNntPlatformCouponById(Long numId)
    {
        return nntPlatformCouponMapper.selectNntPlatformCouponById(numId);
    }

    /**
     * 查询平台优惠券列表
     * 
     * @param nntPlatformCoupon 平台优惠券
     * @return 平台优惠券
     */
    @Override
    public List<NntPlatformCoupon> selectNntPlatformCouponList(NntPlatformCoupon nntPlatformCoupon)
    {
        return nntPlatformCouponMapper.selectNntPlatformCouponList(nntPlatformCoupon);
    }

    /**
     * 新增平台优惠券
     * 
     * @param nntPlatformCoupon 平台优惠券
     * @return 结果
     */
    @Override
    public int insertNntPlatformCoupon(NntPlatformCoupon nntPlatformCoupon)
    {
        return nntPlatformCouponMapper.insertNntPlatformCoupon(nntPlatformCoupon);
    }

    /**
     * 修改平台优惠券
     * 
     * @param nntPlatformCoupon 平台优惠券
     * @return 结果
     */
    @Override
    public int updateNntPlatformCoupon(NntPlatformCoupon nntPlatformCoupon)
    {
        return nntPlatformCouponMapper.updateNntPlatformCoupon(nntPlatformCoupon);
    }

    /**
     * 删除平台优惠券对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteNntPlatformCouponByIds(String ids)
    {
        return nntPlatformCouponMapper.deleteNntPlatformCouponByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除平台优惠券信息
     * 
     * @param numId 平台优惠券ID
     * @return 结果
     */
    @Override
    public int deleteNntPlatformCouponById(Long numId)
    {
        return nntPlatformCouponMapper.deleteNntPlatformCouponById(numId);
    }
}
